package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabInspectSalesman;
import com.ysd.lis.request.lab.CompanyPageParam;
import com.ysd.lis.service.lab.LabInspectSalesmanService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 送检销售人员 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-10-28
 */
@RestController
@RequestMapping("/lab/inspectSalesman")
public class LabInspectSalesmanController extends BaseController {

    @Autowired
    private LabInspectSalesmanService labInspectSalesmanService;

    @ApiOperation("分页查询")
    @GetMapping("/findSalesmanPageList")
    public Result findSalesmanPageList(CompanyPageParam pageParam) {
        return labInspectSalesmanService.findSalesmanPageList(pageParam);
    }

    @ApiOperation("查询")
    @GetMapping("/findSalesmanList")
    public Result findSalesmanList(CompanyPageParam pageParam) {
        return labInspectSalesmanService.findSalesmanList(pageParam);
    }


    @ApiOperation("新增")
    @PostMapping("/addInspectSalesman")
    public Result addInspectSalesman(@RequestBody LabInspectSalesman labInspectSalesman) {
        return labInspectSalesmanService.addInspectSalesman(labInspectSalesman);
    }

    @ApiOperation("修改")
    @PostMapping("/editInspectSalesman")
    public Result editInspectCompany(@RequestBody LabInspectSalesman labInspectSalesman) {
        return labInspectSalesmanService.editInspectCompany(labInspectSalesman);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteSalesman")
    public Result batchDeleteSalesman(@RequestBody List<LabInspectSalesman> list) {
        return labInspectSalesmanService.batchDeleteSalesman(list);
    }

    @ApiOperation("查询")
    @GetMapping("/findSalesmansByPendSettle")
    public Result findSalesmansByPendSettle(CompanyPageParam pageParam) {
        return labInspectSalesmanService.findSalesmansByPendSettle(pageParam);
    }

    @ApiOperation("查询")
    @GetMapping("/getSalesmanList")
    public Result getSalesmanList(CompanyPageParam pageParam) {
        return labInspectSalesmanService.getSalesmanList(pageParam);
    }
}
